Repository navigation
Conversation
Contributor
size-limit report 📦Compared: 40b436b (PR test merge using develop at 9279303) Against: 9279303 (develop) · base run #66015 ✅ Baseline matches: this diff contains only this PR's changes.
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 1 not successful, 9 successful. See the run.
Successful checks
|
timfish
force-pushed
the
feat/nextjs-delete-sourcemaps-after-upload
branch
from
November 13, 2026 11:35
2de614c to
b5b1f4d
Compare
Base automatically changed from
feat/bundler-plugins-delete-without-upload
to
develop
November 13, 2026 13:49
…leteSourcemapsAfterUpload` The webpack client compiler no longer gets the `static/**/*.map` globs. It passes the SDK's `deleteSourcemapsAfterUpload` to the plugin instead, with `true` as the default. A user's own `filesToDeleteAfterUpload` is passed through and replaces this deletion, as before, so the plugin then gets `false`. Whenever the client deletes, it also passes `sdkEnabledSourceMaps`, so the plugin removes every JS and CSS map of the client build: those the SDK turned on and those the user turned on with `productionBrowserSourceMaps` or `devtool`, also of chunks outside the upload globs and also when no upload runs. Server and edge compilers get `false`, so their maps stay as before. Turbopack and `useRunAfterProductionCompileHook` builds keep the globs. The E2E apps now import a CSS file and also check `.next/static` for `sourceMappingURL` comments in JS and CSS.
timfish
force-pushed
the
feat/nextjs-delete-sourcemaps-after-upload
branch
from
November 13, 2026 13:53
b5b1f4d to
7af6213
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Next.js SDK deleted client source maps on webpack with its own
static/**/*.mapglobs. This PR hands that job to the bundler plugin'sdeleteSourcemapsAfterUpload: the client compiler passes the SDK option, withtrueas the default whensourcemaps.disableis not set, and the server and edge compilers passfalse, so server maps stay as before. A user's ownfilesToDeleteAfterUploadis still passed through and replaces the SDK's deletion, as today. Turbopack and theuseRunAfterProductionCompileHookpath keep their globs.Without the internal
sdkEnabledSourceMapsflag from #26281, the plugin removes every map of a build only when it turned the maps on itself. Next.js turns them on, so the plugin would remove only the maps of uploaded chunks, and Next's narrow upload globs would leavemain-*,framework-*, shared chunk and CSS maps behind. The client compiler therefore passes that flag whenever it deletes. The plugin then removes every JS and CSS map of the client build, with or without an upload, including maps the user turned on withproductionBrowserSourceMaps.There are two differences you can see. First, for maps the user turned on as visible maps, the plugin switches to hidden maps, so the
sourceMappingURLcomments that pointed at the deleted files are gone too. Second, client maps are no longer written to disk and then deleted inafterEmit, so a plugin that reads them from disk after emit finds none. The E2E apps now include CSS and also check forsourceMappingURLcomments.